package com.xbb.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
/**
 * <p>
 * 角色表
 * </p>
 *
 * @author Mr xie
 * @since 2020-05-19
 */
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("roles")
public class Role{
    @TableId(type = IdType.AUTO)
    private Integer id;
    @NotNull(message = "角色名称不能为空")
    @Size(min = 2, max = 11, message = "角色名称必须是2-11个字符")
    private String name;
    private Integer weight;
    private String remark;
}
